<template>
  <el-pagination
    :total="paginator.recordCount"
    :page-size="paginator.pageSize"
    :page-sizes="[10, 20, 30, 40]"
    :current-page="paginator.pageIndex"
    @current-change="curChange"
    @size-change="sizeChange"
    layout="total,prev,pager,next,sizes,jumper">
  </el-pagination>
</template>

<script>
export default {
  name: 'my-pagination',
  props: {
    paginator: {
      type: Object
    }
  },
  methods: {
    curChange (page) {
      this.$emit('handleCurChange', page)
    },
    sizeChange (size) {
      this.$emit('handleSizeChange', size)
    }
  }
}
</script>

<style>
</style>
